package com.haohe.wx.dao.impl;

import java.sql.ResultSet;
import java.sql.SQLException;

import javax.annotation.Resource;

import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.RowMapper;
import org.springframework.jdbc.core.simple.ParameterizedRowMapper;

import com.haohe.wx.dao.LogDao;
import com.haohe.wx.model.Log;

public class LogDaoImpl implements LogDao {
   
	@Resource
	private JdbcTemplate wxplatJdbcTemplate = null;

	protected RowMapper<Log> getRowMapper() {
		ParameterizedRowMapper<Log> mapper = new ParameterizedRowMapper<Log>() {
			public Log mapRow(ResultSet rs, int rowNum) throws SQLException {
				Log log = new Log();
				log.setId("");
				log.setName("");
				return log;
			}
		};
		return mapper;
	}

	@Override
	public void create(Log log) {
		wxplatJdbcTemplate
		.update("insert into log(id,name) values(?,?)",log.getId(),log.getName());

	}
	
//	
//	public void query(Log log) {
//		wxplatJdbcTemplate.query(psc, rse);
//
//	}

}
